<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
  <div id="app">
    <custom-dialog :age="'20'" :city="city"
    :user="userinfo"
    ></custom-dialog>
  </div>
  <script>

    Vue.component('custom-dialog',{
      props:['age','city','user'],
      template:`<div>dialog</div>`,
      mounted(){
        console.log('age:',this.age)
        console.log('city:',this.city)
        console.log('user:',this.user)
      }
    })
    
    var vm = new Vue({
      el: "#app",
      data:{
        city:['北京','太原'],
        userinfo:{username:'xiaoming',age:20}
      }
    })
  </script>
</body>

</html>